/*
 * @Author: CQJ
 * @Date: 2022-08-25 20:00:27
 * @LastEditors: CQJ
 * @LastEditTime: 2022-09-19 23:28:18
 * @Description:
 */
import { reactive } from 'vue'

interface CustomState {
  isAdd: boolean
  customVisible: boolean
}

// 自定义配置状态管理
export const customState = reactive<CustomState>({
  isAdd: false,
  customVisible: false
})
interface CustomForm {
  id: string | undefined
  title: string
  logo_shape: number
  logo: string
  icon: string
  status: number
}
// 自定义配置弹窗formState
export const customForm = reactive<CustomForm>({
  id: undefined,
  title: '',
  logo_shape: 0, //0-正方形 1-圆形 2-长方形
  logo: '',
  icon: '',
  status: 1 //0-关闭 1-开启
})
export const customRules = reactive({
  title: [{ required: true, message: '请输入网页Title' }],
  logo: [{ required: true, message: '请上传Logo图片' }],
  icon: [{ required: true, message: '请上传Icon图片' }]
})
